package sw;

import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
public class Application {

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }
    
    //备忘关于调试出现 “throw new SilentExitException()” 异常的不得已处理方法
    //toggle the "suspend execution on uncaught exceptions" checkbox in 
    //Java -> Debug preferences to prevent it from happening.
    
    //本项目用下面方法初始化数据库数据，防止应用程序每次启动后内存数据库都没有数据
	@Bean
	public CommandLineRunner demo() {
		return (args) -> {
			System.out.println("hello world");
		};
    }

}
